{extend name="admin@public/base_content" /}
{block name="body">}
<body>
{include file="admin@public/common" /}
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <section class="panel panel-padding">
                <form id="form1" class="layui-form layui-form-pane" action="{:url('')}">

                    <div class="layui-form-item">
                        <label class="layui-form-label">站点模板</label>
                        <div class="layui-input-inline">
                            <input type="text" name="tpl_name" id="tpl_name" value="{$info.tpl_name|default=''}"  class="layui-input ">
                        </div>
                        <div class="layui-input-inline">
                            <select jq-error="请选择" lay-filter="tpl_name">
                                <option value="">请选择</option>
                                {foreach name="themesList" item="vo"}
                                <option value="{$vo.file}">{$vo.name}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">首页模板</label>
                        <div class="layui-input-inline">
                            <input type="text" name="tpl_index" id="tpl_index" value="{$info.tpl_index|default=''}"  class="layui-input ">
                        </div>
                        <div class="layui-input-inline">
                            <select jq-error="请选择" lay-filter="tpl_index">
                                <option value="">请选择</option>
                                {foreach name="tplList" item="vo"}
                                <option value="{$vo.name}">{$vo.file}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">搜索模板</label>
                        <div class="layui-input-inline">
                            <input type="text" name="tpl_search" id="tpl_search" value="{$info.tpl_search|default=''}"  class="layui-input ">
                        </div>
                        <div class="layui-input-inline">
                            <select jq-error="请选择" lay-filter="tpl_search">
                                <option value="">请选择</option>
                                {foreach name="tplList" item="vo"}
                                <option value="{$vo.name}">{$vo.file}</option>
                                {/foreach}
                            </select>
                        </div>
                    </div>


                    <div class="layui-input-block">
                        <button class="layui-btn" jq-submit lay-filter="submit" jq-tab="true">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </form>
            </section>
        </div>
    </div>
</div>
</body>
{/block}
{block name="script"}
<script>
    layui.use('pageform', function(){
        var form = layui.form();
        var $= layui.jquery;

        //各种基于事件的操作，下面会有进一步介绍
        form.on('select(tpl_name)', function(data){
            document.getElementById("tpl_name").value=data.value;
        });
        form.on('select(tpl_index)', function(data){
            document.getElementById("tpl_index").value=data.value;
        });
        form.on('select(tpl_search)', function(data){
            document.getElementById("tpl_search").value=data.value;
        });
    });
</script>
{/block}